<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title th:text="${title} + ' - 王氏美容汽车集团管理系统'">用户注册 - 王氏美容汽车集团管理系统</title>
    
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    
    <style>
        body {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
        }
        .register-card {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border: none;
            border-radius: 20px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }
        .register-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 2rem;
            text-align: center;
        }
        .register-body {
            padding: 2rem;
        }
        .form-control {
            border-radius: 10px;
            border: 2px solid #e9ecef;
            padding: 0.75rem 1rem;
            transition: all 0.3s ease;
        }
        .form-control:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
        }
        .btn-register {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            border-radius: 10px;
            padding: 0.75rem 2rem;
            font-weight: 600;
            color: white;
            transition: all 0.3s ease;
        }
        .btn-register:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
            color: white;
        }
        .input-group-text {
            background: #f8f9fa;
            border: 2px solid #e9ecef;
            border-right: none;
            border-radius: 10px 0 0 10px;
        }
        .input-group .form-control {
            border-left: none;
            border-radius: 0 10px 10px 0;
        }
        .alert {
            border-radius: 10px;
            border: none;
        }
        .text-link {
            color: #667eea;
            text-decoration: none;
            font-weight: 500;
        }
        .text-link:hover {
            color: #764ba2;
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-lg-6 col-md-8">
                <div class="card register-card">
                    <div class="register-header">
                        <h3 class="mb-0">
                            <i class="fas fa-user-plus me-2"></i>用户注册
                        </h3>
                        <p class="mb-0 mt-2 opacity-75">创建您的账户，开始使用系统</p>
                    </div>
                    
                    <div class="register-body">
                        <!-- 提示信息 -->
                        <div class="alert alert-info" role="alert">
                            <i class="fas fa-info-circle me-2"></i>
                            <strong>注册功能暂未开放</strong><br>
                            如需注册账户，请联系系统管理员。
                        </div>

                        <!-- 注册表单 -->
                        <form method="post" action="/register" novalidate>
                            <div class="mb-3">
                                <label for="username" class="form-label">用户名</label>
                                <div class="input-group">
                                    <span class="input-group-text">
                                        <i class="fas fa-user"></i>
                                    </span>
                                    <input type="text" class="form-control" id="username" name="username" 
                                           placeholder="请输入用户名" required disabled>
                                </div>
                            </div>

                            <div class="mb-3">
                                <label for="email" class="form-label">邮箱地址</label>
                                <div class="input-group">
                                    <span class="input-group-text">
                                        <i class="fas fa-envelope"></i>
                                    </span>
                                    <input type="email" class="form-control" id="email" name="email" 
                                           placeholder="请输入邮箱地址" required disabled>
                                </div>
                            </div>

                            <div class="mb-3">
                                <label for="phone" class="form-label">手机号码</label>
                                <div class="input-group">
                                    <span class="input-group-text">
                                        <i class="fas fa-phone"></i>
                                    </span>
                                    <input type="tel" class="form-control" id="phone" name="phone" 
                                           placeholder="请输入手机号码" required disabled>
                                </div>
                            </div>

                            <div class="mb-3">
                                <label for="password" class="form-label">密码</label>
                                <div class="input-group">
                                    <span class="input-group-text">
                                        <i class="fas fa-lock"></i>
                                    </span>
                                    <input type="password" class="form-control" id="password" name="password" 
                                           placeholder="请输入密码" required disabled>
                                </div>
                                <div class="form-text">密码长度至少8位，包含字母和数字</div>
                            </div>

                            <div class="mb-3">
                                <label for="confirmPassword" class="form-label">确认密码</label>
                                <div class="input-group">
                                    <span class="input-group-text">
                                        <i class="fas fa-lock"></i>
                                    </span>
                                    <input type="password" class="form-control" id="confirmPassword" name="confirmPassword" 
                                           placeholder="请再次输入密码" required disabled>
                                </div>
                            </div>

                            <div class="mb-3">
                                <label for="realName" class="form-label">真实姓名</label>
                                <div class="input-group">
                                    <span class="input-group-text">
                                        <i class="fas fa-id-card"></i>
                                    </span>
                                    <input type="text" class="form-control" id="realName" name="realName" 
                                           placeholder="请输入真实姓名" required disabled>
                                </div>
                            </div>

                            <div class="mb-4">
                                <div class="form-check">
                                    <input class="form-check-input" type="checkbox" id="agreeTerms" name="agreeTerms" required disabled>
                                    <label class="form-check-label" for="agreeTerms">
                                        我已阅读并同意 <a href="#" class="text-link">用户协议</a> 和 <a href="#" class="text-link">隐私政策</a>
                                    </label>
                                </div>
                            </div>

                            <div class="d-grid mb-3">
                                <button type="submit" class="btn btn-register" disabled>
                                    <i class="fas fa-user-plus me-2"></i>注册账户
                                </button>
                            </div>
                        </form>

                        <div class="text-center">
                            <p class="mb-0">
                                已有账户？ <a href="/login" class="text-link">立即登录</a>
                            </p>
                            <p class="mt-2">
                                <a href="/" class="text-link">
                                    <i class="fas fa-home me-1"></i>返回首页
                                </a>
                            </p>
                        </div>
                    </div>
                </div>

                <!-- 联系信息 -->
                <div class="text-center mt-4">
                    <div class="card" style="background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); border: none; border-radius: 15px;">
                        <div class="card-body text-white">
                            <h6 class="mb-3">
                                <i class="fas fa-headset me-2"></i>需要帮助？
                            </h6>
                            <p class="mb-2">
                                <i class="fas fa-phone me-2"></i>客服热线：400-888-8888
                            </p>
                            <p class="mb-2">
                                <i class="fas fa-envelope me-2"></i>邮箱：support@carbeauty.com
                            </p>
                            <p class="mb-0">
                                <i class="fas fa-clock me-2"></i>服务时间：周一至周日 9:00-18:00
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Bootstrap JS -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    
    <!-- 表单验证脚本 -->
    <script>
        // 表单验证
        (function() {
            'use strict';
            window.addEventListener('load', function() {
                var forms = document.getElementsByClassName('needs-validation');
                var validation = Array.prototype.filter.call(forms, function(form) {
                    form.addEventListener('submit', function(event) {
                        if (form.checkValidity() === false) {
                            event.preventDefault();
                            event.stopPropagation();
                        }
                        form.classList.add('was-validated');
                    }, false);
                });
            }, false);
        })();

        // 密码确认验证
        document.getElementById('confirmPassword').addEventListener('input', function() {
            const password = document.getElementById('password').value;
            const confirmPassword = this.value;
            
            if (password !== confirmPassword) {
                this.setCustomValidity('密码不匹配');
            } else {
                this.setCustomValidity('');
            }
        });

        // 手机号验证
        document.getElementById('phone').addEventListener('input', function() {
            const phone = this.value;
            const phonePattern = /^1[3-9]\d{9}$/;
            
            if (phone && !phonePattern.test(phone)) {
                this.setCustomValidity('请输入正确的手机号码');
            } else {
                this.setCustomValidity('');
            }
        });
    </script>
</body>
</html>
